<template>
  <div class="contact">
    <div class="left-view">
      <div class="form-title">
        {{ list[leftIndex].title }}
        <span class="sign">*</span>
      </div>
      <div v-if="list[leftIndex].titleDescribe" class="describe">{{ list[leftIndex].titleDescribe }}</div>
      <div class="input-content">
        <el-input :placeholder="list[leftIndex].placeholder"></el-input>
        <div v-if="list[leftIndex].noteVerify" class="note-btn">
          <el-button type="primary" size="small" round>获取验证码</el-button>
        </div>
      </div>
    </div>
    <div v-if="list[leftIndex].showRight" class="right-view">
      <div class="nav-title">联系人手机</div>
      <div class="form-title">
        标题
        <span class="sign">*</span>
      </div>
      <el-input v-model="list[leftIndex].title" />
      <div class="form-title">标题描述</div>
      <el-input v-model="list[leftIndex].titleDescribe" />
      <div class="form-title">默认提示文字</div>
      <el-input v-model="list[leftIndex].placeholder" />
      <div class="form-title">填写设置</div>
      <el-checkbox v-model="list[leftIndex].noteVerify">发送短信验证码</el-checkbox>
    </div>
  </div>
</template>

<script>
export default {
  props: ['list', 'leftIndex'],
  data() {
    return {

    }
  },
  mounted() {
    console.log(this.list, this.leftIndex)
  }
}
</script>

<style lang="scss" scoped>
.contact {
  padding: 10px;
  .left-view {
    .form-title {
      margin: 8px 0px;
      .sign {
        color: red;
      }
    }
    .describe {
      margin-bottom: 5px;
      font-size: 12px;
      color: #676767;
    }
    .input-content {
      position: relative;
      .note-btn {
        position: absolute;
        top: 2px;
        right: 5px;
      }
    }
  }
  .right-view {
    position: absolute;
    top: 0;
    left: 100%;
    z-index: 7;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    width: 355px;
    min-height: 28px;
    margin-left: 20px;
    padding: 0 20px 20px;
    color: #353535;
    font-size: 14px;
    font-family: 'PingFangSC-Medium';
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    .nav-title {
      height: 50px;
      font-weight: 800;
      line-height: 50px;
      border-bottom: 1px solid #eee;
    }
    .form-title {
      margin: 16px 0px;
      .sign {
        color: red;
      }
    }
  }
  .right-view::before {
    border-color: transparent;
    border-right-color: #e5e5e5;
    position: absolute;
    top: 40px;
    left: -20px;
    content: ' ';
    width: 0px;
    height: 0px;
    border-width: 10px;
    border-style: solid;
  }
}
</style>